#ifndef  __CAP_H
#define  __CAP_H

//----------------------------------Include-------------------------------------
#include  <stdint.h>
//------------------------------------------------------------------------------

//-----------------------------------Macro--------------------------------------
#define CAP_NORMAL      0
#define CAP_IMMER       1
#define CAP_I2C_ERR     2
#define CAP_REF_ERR     3
#define CAP_UNKNOWN     4
//------------------------------------------------------------------------------

//------------------------------------Type--------------------------------------
typedef struct{
  uint16_t   cap1;
  uint16_t   cap2;
  uint16_t   err;
  uint16_t   done;
}t_cap;
//------------------------------------------------------------------------------

//---------------------------------Share Var------------------------------------
#ifdef  CAP_GLOBALS
#else
extern uint32_t                gu32_mdc04_err;
extern t_cap                   gt_cap_rt;
extern t_cap                   gt_cap_res;
#endif
//------------------------------------------------------------------------------

//----------------------------------Declare-------------------------------------
void cap_reset(void);
void cap_cyc(void);
//------------------------------------------------------------------------------

#endif
//------------------------------------EOF---------------------------------------



